<h1>Edit Address</h1>

<?php $adress = $this->UserAdd[0]; ?>

<form action="/main/profile/addresspost" name="edit_address" id="edit_address" method="post">
    <label for="RecentPhoto">Address type</label>
    
    <?php 
        $address_type = array(
              ''=>'---------Please Select---------',
              'p'=>'Permanent',
              'c'=>'Communication',
              'o'=>'Office/Organization'
        );
    ?>
    
    <select name="address_type">
        <?php foreach($address_type as $key=>$val){?>
        <option value="<?php echo $key?>" <?php if($adress['address_type'] == $key) {?> selected <?php } ?> ><?php echo $val?></option>
        <?php }?>
    </select>
    <label for="Address Line1">Address Line1</label>
    <input type="text" name="AddressLine1" id="AddressLine1" value="<?php echo $adress['AddressLine1']?>" class="validate[required] frmInput">
    <label for="Address Line1">Address Line1</label>
    <input type="text" name="AddressLine2" id="AddressLine2" value="<?php echo $adress['AddressLine2']?>" class="validate[required] frmInput">
    <label for="Address City">City</label>
    <input type="text" name="AddressCity" id="AddressCity" value="<?php echo $adress['AddressCity']?>" class="validate[required] frmInput">
    <label for="Address State">State</label>
    <input type="text" name="AddressState" id="AddressState" value="<?php echo $adress['AddressState']?>" class="validate[required] frmInput">
    <label for="Address Country">Country</label>
    <input type="text" name="AddressCountry" id="AddressCountry" value="<?php echo $adress['AddressCountry']?>" class="validate[required] frmInput">
    <label for="AddressPIN">Pin</label>
    <input type="text" name="AddressPIN" id="AddressPIN" value="<?php echo $adress['AddressPIN']?>" class="validate[required] frmInput">
    <label for="AddressPhone1">Phone1</label>
    <input type="text" name="AddressPhone1" id="AddressPhone1" value="<?php echo $adress['AddressPhone1']?>" class="validate[required] frmInput">
    <label for="AddressPhone2">Phone2</label>
    <input type="text" name="AddressPhone2" id="AddressPhone2" value="<?php echo $adress['AddressPhone2']?>" class="validate[required] frmInput">
    <input type="hidden" name="hiddenAddressId" value="<?php echo $adress['address_id']?>"/>
    <div class="frm_row">
        <input type="submit" value="Update Address" class="submitBtn">
    </div>
</form>